<template>
  <div class="goodsDetail">
    <BreadNav />
    <div class="DetailTop bodycontent">
      <div class="DetailLeft">
        <ShopSwiper />
      </div>
      <div class="DetailRight">
        <h3>新疆哈密瓜1500kg</h3>
        <div class="goodsTagBox clear">
          <span class="greenBg">全国</span><span class="orangeBg">礼拜五</span><span  class="greenBg">次日达</span><span  class="greenBg">自营</span>
        </div>
        <div class="goodsDetailDesc clear">
          <div>
            <img src="../assets/img/orange.png" alt="">
          </div>
          <p>以更坚定的信心、更顽强的意志、更果断的措施，紧紧依靠人民群众，坚决把疫情扩散蔓延势头遏制住，坚决打赢疫情防控的人民战争、总体战、阻击战。”习近平的坚定话语不仅为取得战“疫”全面胜利提供了根本遵循，也极大提升了广大人民群众面对疫情的必胜信心。</p>
        </div>
        <div  class="detailPrice">
          <span class="nowPrice">现价：￥20.0</span>
          <span class="beforePrice">原价￥40.0</span>
        </div>
        <div class="chooseSpecs clear">
          <span>请选择规格</span>
          <em class="specsActive">5000g</em><em>5000g</em><em>5000g</em>
        </div>
        <div class="operateBox clear">
          <span>数量：</span>
          <div class="buyNum"><NumCount /></div><span>件</span>
          <input type="button" class="addShopCart" value="加入购物车">
          <input type="button" class="atOnceBuy" value="立即购买">
        </div>
        <div class="collectThis">
          <span>收藏此商品</span>
        </div>
      </div>
    </div>
    <div class="DetailBottom bodycontent">
      <div class="DetailBottomBtn clear">
        <span :class="{spanActive:isShowPro}" @click="isShowPro=true">商品详情</span>
        <span :class="{spanActive:!isShowPro}" @click="isShowPro=false">商品评价</span>
      </div>
      <div v-show="isShowPro">
        <GoodsBottomDetail />
      </div>
      <div  v-show="!isShowPro">
        <GoodsMark />
      </div>
    </div>
  </div>
</template>
<script>
import BreadNav from "@/components/BreadNav.vue";
import ShopSwiper from '@/components/ShopSwiper.vue';
import NumCount from '@/components/NumCount.vue';
import GoodsBottomDetail from '@/components/GoodsBottomDetail.vue';
import GoodsMark from '@/components/GoodsMark.vue';
export default {
  components:{
    BreadNav,
    ShopSwiper,
    NumCount,
    GoodsBottomDetail,
    GoodsMark
  },
  data(){
    return {
      isShowPro:true,
    }
  }
}
</script>
<style>
  .goodsDetail{
    margin-bottom: 20px;
  }
  .DetailTop{
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    margin-bottom: 20px;
  }
  .DetailTop .DetailLeft{
    width: 35%;
  }
  .DetailTop .DetailRight{
    width: 60%;
  }
  .DetailRight h3{
    height: 60px;
    line-height: 60px;
    font-size: 23px;
    font-weight: 500;
  }
  .DetailTop .goodsTagBox{
    padding-bottom: 20px;
    border-bottom: 1px solid #ccc;
  }
  .DetailTop .goodsTagBox span{
    font-size: 16px;
    line-height: 26px;
    color: #fff;
    float: left;
    padding: 0 10px;
    margin-right: 15px;
  }
  .goodsDetailDesc{
    font-size: 15px;
    line-height: 30px;
    margin-top: 20px;
    
  }
  .goodsDetailDesc{
    padding-bottom: 20px;
    border-bottom: 1px solid #ccc;
  }
  
  .goodsDetailDesc>div{
    float: left;
    width: 15%;
  }
  .goodsDetailDesc img{
    width: 100%;
  }
  .goodsDetailDesc p{
    float: right;
    width: 80%;
  }
  .detailPrice{
    margin-top: 20px;
    margin-bottom: 20px;
  }
  .detailPrice .nowPrice{
    font-size: 26px;
    color: #ff5757;
  } 
  .detailPrice .beforePrice{
    font-size: 16px;
    text-decoration: line-through;
    color: #666;
    margin-left: 20px;
  }
  .chooseSpecs{
    font-size: 16px;
    line-height: 32px;
    color: rgb(71, 71, 71);
    margin-bottom: 20px;
  }
  .chooseSpecs span,.chooseSpecs em{
    float: left;
    margin-right: 15px;
  }
  .chooseSpecs em{
    padding: 0 15px;
    border: 1px solid #ccc;
  }
  .chooseSpecs em.specsActive{
    border: 1px solid #4b943d;
  }
  .operateBox{
    margin-bottom: 20px;
  }
  .operateBox>span,.operateBox .buyNum,.operateBox input{
    float: left;
  }
  .operateBox>span{
    margin-top: 15px;
  }
  .operateBox .buyNum{
    margin-top: 11px;
  }
  .operateBox>input{
    width: 150px;
    height: 50px;
    border-radius: 5px;
    border: none;
    margin-left: 15px;
    font-size: 20px;
    color:#fff;
  }
  .operateBox .addShopCart{
    background: #ffae4f;
  } 
  .operateBox .atOnceBuy{
    background: #f08200;
  }
  .DetailBottom{
    border: 1px solid rgb(146, 145, 145);
  }
  .DetailBottomBtn{
    height: 50px;
    line-height: 50px;
    font-size: 18px;
    background-color: rgb(216, 213, 213);
    border-bottom: 1px solid rgb(146, 145, 145);
  }
  .DetailBottomBtn span{
    float: left;
    width: 122px;
    height: 100%;
    text-align: center;
    border-right: 1px solid rgb(146, 145, 145);
  }
  .DetailBottomBtn .spanActive{
    background-color: #fff;
    color: #4b943d;
  }
</style>